package com.study.example.gameserver.module.entity;


import com.sparrow.cache.entity.AbstractEntity;
import com.sparrow.common.thread.IdExecutorGroup;
import com.study.example.gameserver.module.player.entity.Player;

import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

/**
 * 抽象玩家模块数据，供子类继承
 */
@MappedSuperclass
public abstract class PlayerData extends AbstractEntity<Long> {
    @Id
    protected Long playerId;

    @Override
    public Long getPK() {
        return playerId;
    }

    @Override
    public long dispatchCode() {
        return playerId;
    }

    /**
     * 暴露接口
     * @param player
     */
    public void afterLoad(Player player) {

    }

}
